<template>
  <div>
    <div class="boxItem">
      <el-select :teleported="false" :multiple="props.multiple" :collapse-tags="props.collapseTags" @change="changeValue"
        :model-value="props.value" class="inputWidth" :placeholder="props.placeholder">
        <el-option v-for="item in props.options" :key="item.value" :label="item.label" :value="item.value" />
      </el-select>
    </div>
  </div>
</template>
<script setup>
const props = defineProps({
  options: {
    type: Array,
    default: []
  },
  value: {

  },
  placeholder: {
    type: String,
    default: ''
  },
  multiple: {
    type: Boolean,
    default: false
  },
  collapseTags: {
    type: Boolean,
    default: false
  }
})
const emit = defineEmits(["change"])
const changeValue = (val) => {
  emit('change', val)
}
</script>
<style lang="scss" scoped>
.boxItem {
  .inputWidth {
    width: 180px;
  }
}
</style>